# -*- coding: utf-8 -*-
import os
from liberHook.BaseHook import BaseHook
import maya.mel as mel


class Hook(BaseHook):
    def __init__(self, library, directory, ext, start, end):
        BaseHook.__init__(self, library, directory, ext, start, end)

    def execute(self):
        _dir = os.path.dirname(self.file)
        if not os.path.isdir(_dir):
            os.makedirs(_dir)
        mel.eval("FBXExport -f \"%s\" -s" % self.file)
